home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Text Processing / Alpha 5.63 / Tcl / SystemCode / tcl.tcl < prev    next >
Encoding:
Text File  |  1993-11-20  |  919 b   |  37 lines  |  [TEXT/ALFA]

  1. #===========================================================================
  2. # Debug a Tcl procedure.
  3. #===========================================================================
  4.  
  5. # Alpha TCL programming mode
  6. proc traceTclProc {} {
  7.     if {[llength [traceFunc status]]>2} {
  8.         traceFunc off
  9.         markMenuItem Tcl traceTclProc off
  10.         return
  11.     }
  12.     set func [listpick -p {Func Name:} [lsort [info procs]]]
  13.     if {![string length $func]} return
  14.     set win [listpick -p {Output window:} [lsort [winNames]]]
  15.     if {![string length $win]} return
  16.     traceFunc on $func $win
  17.     markMenuItem Tcl traceTclProc on
  18. }
  19.  
  20. proc setTclMode {} {
  21.     changeMode "Tcl"
  22.     uplevel #0 {
  23.         set elecLBrace 0
  24.         set elecRBrace 0
  25.         set electricSemi 0
  26.         set wordWrap 0
  27.         set funcExpr {^proc *([+-a-zA-Z0-9]+)}
  28.         set wordBreakPreface {[^a-zA-Z0-9_\$]}
  29.         set wordBreak {(\$)?[a-zA-Z0-9_]+}
  30.         set funcPar 1
  31.         set sortedIsDefault 1
  32.         set prefixString "# "
  33.     }
  34.     insertMenu Tcl
  35. }
  36.  
  37.